<template>
    <!-- 语言切换 货币 工作时间 我的账号 关于我们... -->
  <div class="header-top-wrap">
    <div class="container custom-container">
        <div class="row align-items-center">
            <div class="col-md-7">
                <div class="header-top-left">
                    <ul>
                        <li class="header-top-lang">
                            <div class="dropdown">
                                <button class="dropdown-toggle" type="button" id="dropdownMenuButton2" data-toggle="dropdown" aria-haspopup="true"
                                    aria-expanded="false">{{ language[0] }}</button>
                                <div class="dropdown-menu" aria-labelledby="dropdownMenuButton2">
                                    <a class="dropdown-item" v-for="(lang,index) in language" href="javascript:;" :key="index"  >{{ lang }}</a>
                                  
                                </div>
                            </div>
                        </li>
                        
                        <li class="header-work-time">
                           工作时间: <span> {{  worktime.day}}:{{ worktime.Hour }}({{  worktime.msg}})</span>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="col-md-5">
                <div class="header-top-right">
                    <ul>
                        <li>{{  isLogin}}</li>
                        <li v-if="isLogin"><span  style="color: green;">{{ customer.name }}</span></li>
                        <li><router-link to="/about">关于我们</router-link ></li>
                        <li><router-link to="/contact">联系我们</router-link></li>
                        <li><router-link to="/question">常见问题</router-link></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>
</template>

<script>
import { state } from '@/api/api';
import { mapGetters,mapState } from 'vuex';
export default {
        data() {
            return {
                language:['简体中文','English','繁体中文','日本語'],
                worktime:{
                    day:'周一 ~ 周五',
                    Hour:'8:00 - 21:00',
                    msg:'节假日不打烊'
                }
            }
        },
        computed:{
           ...mapGetters('customer',['isLogin']),
           ...mapState({
            customer:state=>state.customer.customer
           })
        }
}
</script>

<style>

</style>